﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;
using Microsoft.Practices.ServiceLocation;
using RentAWorker.Business.Interfaces;
using WebServices.CustomerService;

namespace WebServices
{
    public class WebServicesModule : IModule
    {
        private IUnityContainer Container { get; set; }

        public WebServicesModule(IUnityContainer container)
        {
            this.Container = container;
        }

        public void Initialize()
        {
            RegisterTypes();
        }

        private void RegisterTypes()
        {
            this.Container.RegisterInstance<IManageCustomerService>(new ManageCustomerServiceClient());
            this.Container.RegisterInstance<ICustomerService>(new CustomerServiceClient());
            //this.Container.RegisterType<IRentRequestService, DummyRentRequestService>();
            //this.Container.RegisterType<IManageResourceService, DummyResourceManagementService>();
        }
    }
}
